-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new anchors in my-settings and handle offset sub-menu height #3032
Add new anchors in my-settings and handle offset sub-menu height #3032
Conversation
45d5600
to
12d8d58
Compare
client/src/app/app.component.ts
Outdated
@@ -114,6 +114,8 @@ export class AppComponent implements OnInit, AfterViewInit { | |||
let resetScroll = true | |||
const eventsObs = this.router.events | |||
|
|||
this.viewportScroller.setOffset([0, 81]) // sub-menu-height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should only be applied if targeting my-account
no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my-account
and about
? Maybe we would add any anchors in about/instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
One thing left, for example when we request two times on /my-account/settings#notifications and we scrolled between the two requests we would like to go back to the anchor #notifications scroll position with the scrollToAnchor. My knowledge of Angular Router is still limited, would you have an idea @rigelk @Chocobozzz how to proceed ? which routee event we should subscribe ? |
Sorry I don't know |
All links in the user dropdown-menu refered to
/my-account/settings
with an anchor#video-settings
, does not scroll exactly to the the target element, plus when we are on my-settings all these links can't work properly since they have the same anchor.It also handle the offset with the fixed sub-menu.